package com.mojawa.mj_amap.activity


import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import com.mojawa.mj_amap.R

class MainActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_main)
//        openservice=findViewById(R.id.openservice)
//        openint=findViewById(R.id.openintent)
//        closeservice=findViewById(R.id.closeservice)
//        dicince=findViewById(R.id.dicince)
//        openint?.setOnClickListener {
//            PermissionUtils.checkLocationPermission(this) {
////                startActivity(Intent(this, com.mojawa.mj_amaplib.AmapAcyivity::class.java))
//            }
//
//        }
//        openservice?.setOnClickListener {
//            PermissionUtils.checkLocationPermission(this) {
//                if (!MJTimeUtil.isServiceRunning(this, MJAMapLocationService::class.java)){
//                    MJTimeUtil.startServiceCompat(this, Intent(this,MJAMapLocationService::class.java))
//                }
//            }
//
//        }
//        closeservice?.setOnClickListener {
//            MJTimeUtil.closeServiceCompat(this, Intent(this,MJAMapLocationService::class.java))
//        }
//
//
//    }
//
//    // 处理权限请求结果
//    override fun onRequestPermissionsResult(requestCode: Int, permissions: Array<out String>, grantResults: IntArray) {
//        super.onRequestPermissionsResult(requestCode, permissions, grantResults)
//        PermissionUtils.handlePermissionsResult(requestCode, permissions, grantResults, this)
//    }

    }

}